<form autocomplete="off" class="layui-form layui-box modal-form-box" action="{:request()->url()}" data-auto="true"
      method="post">

    <div class="layui-form-item">
        <label class="layui-form-label">区域代理</label>
        <div class="layui-input-block">
            <input type="text" name="area_name" value='{$vo.area_name|default=""}' required="required" title="请输入区域代理"
                   placeholder="请输入区域代理" readonly class="layui-input">
        </div>
    </div>


    <div class="layui-form-item">
        <label class="layui-form-label">用户手机号</label>
        <div class="layui-input-block">
            <input type="number" name="phone" id="usertel" required="required" title="请输入用户手机号"
                   placeholder="请输入用户手机号"  class="layui-input">
        </div>
    </div>


    <div class="hr-line-dashed"></div>

    <div class="layui-form-item text-center">
        {if isset($vo['id'])}<input type='hidden' value='{$vo.id}' name='id'>{/if}
        <button class="layui-btn" type='submit'>保存数据</button>
        <button class="layui-btn layui-btn-danger" type='button' data-confirm="确定要取消编辑吗？" data-close>取消编辑</button>
    </div>

</form>
<script>
    // $("#usertel").keyup(function(){
    //     console.log(12312);
    //     re = /^1\d{10}$/
    //     if (re.test(phone)) {
    //         $.ajax({
    //             type:'post',
    //             url:'add',
    //             datatype:'json',
    //             data:{gsname:gsname,username:username,phone:phone,address:address,level:level},
    //             success:function (data){
    //                 layer.msg(data.msg);
    //                 setTimeout(function(){
    //                     window.location.href="{:url('agency/buy_apply')}?level="+level
    //                 })
    //             }
    //         });
    //     }
    // })
</script>
